package com.crm.jpaandthymeleaf.entity;

import javax.persistence.*;
import java.util.Objects;

/**
 * @author 周敬
 * @version 1.0
 * @packageName com.crm.jpaandthymeleaf.entity
 * @fileName BasDict
 * @createTime 2021/12/15-20:19-星期三
 * @lastModify 2021/12/15-20:19-星期三
 */
@Entity
@Table(name = "bas_dict", schema = "crm", catalog = "")
public class BasDict {
    private long dictId;
    private String dictType;
    private String dictItem;
    private String dictValue;
    private Byte dictIsEditable;

    @Id
    @Column(name = "dict_id")
    public long getDictId() {
        return dictId;
    }

    public void setDictId(long dictId) {
        this.dictId = dictId;
    }

    @Basic
    @Column(name = "dict_type")
    public String getDictType() {
        return dictType;
    }

    public void setDictType(String dictType) {
        this.dictType = dictType;
    }

    @Basic
    @Column(name = "dict_item")
    public String getDictItem() {
        return dictItem;
    }

    public void setDictItem(String dictItem) {
        this.dictItem = dictItem;
    }

    @Basic
    @Column(name = "dict_value")
    public String getDictValue() {
        return dictValue;
    }

    public void setDictValue(String dictValue) {
        this.dictValue = dictValue;
    }

    @Basic
    @Column(name = "dict_is_editable")
    public Byte getDictIsEditable() {
        return dictIsEditable;
    }

    public void setDictIsEditable(Byte dictIsEditable) {
        this.dictIsEditable = dictIsEditable;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        BasDict basDict = (BasDict) o;
        return dictId == basDict.dictId && Objects.equals(dictType, basDict.dictType) && Objects.equals(dictItem, basDict.dictItem) && Objects.equals(dictValue, basDict.dictValue) && Objects.equals(dictIsEditable, basDict.dictIsEditable);
    }

    @Override
    public int hashCode() {
        return Objects.hash(dictId, dictType, dictItem, dictValue, dictIsEditable);
    }
}
